#Boa:Dialog:Dialog1

import wx
import wx.lib.intctrl


def create(parent):
    return Dialog1(parent)

[wxID_DIALOG1, wxID_DIALOG1BUTTON1, wxID_DIALOG1BUTTON2,
 wxID_DIALOG1DATEPICKERCTRL1, wxID_DIALOG1INTCTRL1, wxID_DIALOG1INTCTRL2,
 wxID_DIALOG1INTCTRL3, wxID_DIALOG1INTCTRL4, wxID_DIALOG1INTCTRL5,
 wxID_DIALOG1INTCTRL6, wxID_DIALOG1PANEL1, wxID_DIALOG1STATICTEXT1,
 wxID_DIALOG1STATICTEXT2, wxID_DIALOG1STATICTEXT3, wxID_DIALOG1STATICTEXT4,
 wxID_DIALOG1STATICTEXT5, wxID_DIALOG1STATICTEXT6,
] = [wx.NewId() for _init_ctrls in range(17)]


class Dialog1(wx.Dialog):

    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
              pos=wx.Point(580, 295), size=wx.Size(372, 262),
              style=wx.DEFAULT_DIALOG_STYLE, title='Update database')
        self.SetClientSize(wx.Size(364, 235))

        self.panel1 = wx.Panel(id=wxID_DIALOG1PANEL1, name='panel1',
              parent=self, pos=wx.Point(16, 8), size=wx.Size(320, 208),
              style=wx.TAB_TRAVERSAL)
        self.panel1.SetBackgroundColour(wx.Colour(255, 255, 128))

        self.button1 = wx.Button(id=wx.ID_OK, label=u'OK', name='button1',
              parent=self.panel1, pos=wx.Point(48, 168), size=wx.Size(75, 23),
              style=0)

        self.button2 = wx.Button(id=wx.ID_CANCEL, label=u'Cancel',
              name='button2', parent=self.panel1, pos=wx.Point(192, 168),
              size=wx.Size(75, 23), style=0)
        self.button2.SetDefault()

        self.datePickerCtrl1 = wx.DatePickerCtrl(id=wxID_DIALOG1DATEPICKERCTRL1,
              name='datePickerCtrl1', parent=self.panel1, pos=wx.Point(128, 8),
              size=wx.Size(90, 21), style=wx.DP_SHOWCENTURY)

        self.staticText1 = wx.StaticText(id=wxID_DIALOG1STATICTEXT1,
              label=u'First number', name='staticText1', parent=self.panel1,
              pos=wx.Point(16, 36), size=wx.Size(80, 24), style=0)
        self.staticText1.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.staticText1.SetAutoLayout(False)

        self.staticText2 = wx.StaticText(id=wxID_DIALOG1STATICTEXT2,
              label=u'Second number', name='staticText2', parent=self.panel1,
              pos=wx.Point(16, 80), size=wx.Size(80, 24), style=0)
        self.staticText2.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.staticText3 = wx.StaticText(id=wxID_DIALOG1STATICTEXT3,
              label=u'Third number', name='staticText3', parent=self.panel1,
              pos=wx.Point(16, 120), size=wx.Size(80, 24), style=0)
        self.staticText3.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.staticText4 = wx.StaticText(id=wxID_DIALOG1STATICTEXT4,
              label=u'Fourth number', name='staticText4', parent=self.panel1,
              pos=wx.Point(152, 40), size=wx.Size(96, 21), style=0)
        self.staticText4.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.staticText5 = wx.StaticText(id=wxID_DIALOG1STATICTEXT5,
              label=u'Fifth number', name='staticText5', parent=self.panel1,
              pos=wx.Point(152, 80), size=wx.Size(96, 21), style=0)
        self.staticText5.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.staticText6 = wx.StaticText(id=wxID_DIALOG1STATICTEXT6,
              label=u'Powerball', name='staticText6', parent=self.panel1,
              pos=wx.Point(152, 120), size=wx.Size(96, 21), style=0)
        self.staticText6.SetBackgroundColour(wx.Colour(255, 0, 0))

        self.intCtrl1 = wx.lib.intctrl.IntCtrl(allow_long=False,
              allow_none=False, default_color=wx.BLACK, id=wxID_DIALOG1INTCTRL1,
              limited=False, max=None, min=None, name='intCtrl1',
              oob_color=wx.RED, parent=self.panel1, pos=wx.Point(105, 40),
              size=wx.Size(36, 21), style=0, value=0)

        self.intCtrl2 = wx.lib.intctrl.IntCtrl(allow_long=False,
              allow_none=False, default_color=wx.BLACK, id=wxID_DIALOG1INTCTRL2,
              limited=False, max=None, min=None, name='intCtrl2',
              oob_color=wx.RED, parent=self.panel1, pos=wx.Point(105, 83),
              size=wx.Size(36, 22), style=0, value=0)

        self.intCtrl3 = wx.lib.intctrl.IntCtrl(allow_long=False,
              allow_none=False, default_color=wx.BLACK, id=wxID_DIALOG1INTCTRL3,
              limited=False, max=None, min=None, name='intCtrl3',
              oob_color=wx.RED, parent=self.panel1, pos=wx.Point(105, 119),
              size=wx.Size(36, 22), style=0, value=0)

        self.intCtrl4 = wx.lib.intctrl.IntCtrl(allow_long=False,
              allow_none=False, default_color=wx.BLACK, id=wxID_DIALOG1INTCTRL4,
              limited=False, max=None, min=None, name='intCtrl4',
              oob_color=wx.RED, parent=self.panel1, pos=wx.Point(264, 35),
              size=wx.Size(36, 22), style=0, value=0)

        self.intCtrl5 = wx.lib.intctrl.IntCtrl(allow_long=False,
              allow_none=False, default_color=wx.BLACK, id=wxID_DIALOG1INTCTRL5,
              limited=False, max=None, min=None, name='intCtrl5',
              oob_color=wx.RED, parent=self.panel1, pos=wx.Point(264, 78),
              size=wx.Size(36, 22), style=0, value=0)

        self.intCtrl6 = wx.lib.intctrl.IntCtrl(allow_long=False,
              allow_none=False, default_color=wx.BLACK, id=wxID_DIALOG1INTCTRL6,
              limited=False, max=None, min=None, name='intCtrl6',
              oob_color=wx.RED, parent=self.panel1, pos=wx.Point(264, 118),
              size=wx.Size(36, 22), style=0, value=0)

    def __init__(self, parent):
        self._init_ctrls(parent)

    def GetDateInput(self):
        return_date = wx.DateTime()
        return_date = self.datePickerCtrl1.GetValue()
        print "Updatedb dialog box"
        print return_date
        print return_date.FormatISODate()
        return str(return_date.FormatISODate())

    def GetFirstNumber(self):
        print str(self.intCtrl1.GetValue())
        return int(self.intCtrl1.GetValue())

    def GetSecondNumber(self):
        print str(self.intCtrl2.GetValue())
        return int(self.intCtrl2.GetValue())

    def GetThirdNumber(self):
        print str(self.intCtrl3.GetValue())
        return int(self.intCtrl3.GetValue())

    def GetFourthNumber(self):
        print str(self.intCtrl4.GetValue())
        return int(self.intCtrl4.GetValue())

    def GetFifthNumber(self):
        print str(self.intCtrl5.GetValue())
        return int(self.intCtrl5.GetValue())

    def GetPowerball(self):
        return int(self.intCtrl6.GetValue())

    def GetNumbers(self):
        allNumbers = []
        allNumbers.append(self.intCtrl1.GetValue())
        allNumbers.append(self.intCtrl2.GetValue())
        allNumbers.append(self.intCtrl3.GetValue())
        allNumbers.append(self.intCtrl4.GetValue())
        allNumbers.append(self.intCtrl5.GetValue())
        print allNumbers
        return allNumbers

    def SetPickDate(self, date):
        new_date = wx.DateTime()
        new_date.ParseDate(str(date))
        print str(new_date)
        self.datePickerCtrl1.SetValue(new_date)
